<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title><?php echo $title;?></title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../../public/plugin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="../../public/css/base.css">
  <link rel="stylesheet" href="../../public/icon/demo.css">
  <link rel="stylesheet" href="../../public/icon/iconfont.css">
  <script src="../../public/icon/iconfont.js"></script>
</head>
<body>

  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md12">
        <div class="layui-card">
          <div class="layui-card-header" style="padding-top:30px;font-size:18px;"><?php echo $title;?>
			<div style="float:right;padding-right:20px;">
				<button class="layui-btn layui-btn-normal" id="csv"><span class="iconfont icon-tuichu"></span>&nbsp;导出CSV</button>
				<button class="layui-btn layui-btn-normal" id="print"><span class="iconfont icon-dayinji"></span>&nbsp;打印成绩</button>
			</div>
		  </div>
          <div class="layui-card-body" pad15>
			<table class="layui-table">
			  <thead>
				<tr>
				  <th>id</th>
				  <th>name</th>
				  <th>score</th>
				  <th>所用时间</th>
				</tr> 
			  </thead>
			  <tbody>
			  <?php foreach($list as $k => $v):?>
				<tr>
				  <td><?php echo $v['id'];?></td>
				  <td><?php echo $v['name'];?></td>
				  <td><?php echo $v['score'];?></td>
				  <td><?php echo $v['time'];?></td>
				</tr>
			<?php endforeach;?>
				<tr>
					<td colspan="4">
					  <div class="pages">
						<?php echo $strPage;?>
					  </div>
					</td>
				</tr>
			  </tbody>
			</table>
			
          </div>
        </div>
      </div>
    </div>
  </div>
</body>
</html>
<script src="../../public/js/jquery.js"></script>
<script>
	$(function() {
		$("#csv").click(function(){
			var tx = '<?php echo $title;?>';
			var index = tx.lastIndexOf("\-");
			tx = tx.substring(index+1,tx.length);
			window.location.href="csv.php?tx="+tx;
		});
		//打印
		$("#print").click(function(){
			window.print();
		});
	});
</script>